home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / bgidriv.zip / DEBVECT.ASM < prev    next >
Assembly Source File  |  1989-06-20  |  13KB  |  246 lines

  1. ; =======================================================================
  2. ; FILE: DebVect.ASM
  3. ;
  4. ; COPYRIGHT (c) 1988, 1989 BY BORLAND INTERNATIONAL, Inc.
  5. ;
  6. ; PURPOSE: Device Driver Overlay (DDO) for the DEBUG.BGI driver
  7. ;          This file defines the vector table at the beginning of the
  8. ;          driver. The segment definitions allow this module to be
  9. ;          linked with a Turbo C module.
  10. ;
  11. ; Current Date: 09/15/88
  12. ;
  13. ; Updates:      None.
  14. ;
  15. ; =======================================================================
  16.  
  17.         INCLUDE DEVICE.INC              ; File defines vector table format
  18.  
  19. _TEXT   SEGMENT PARA PUBLIC 'CODE'
  20. _TEXT   ENDS
  21.  
  22. _DATA   segment word public 'DATA'
  23. _DATA   ENDS
  24.  
  25. _BSS    segment word public 'BSS'
  26. _BSS    ENDS
  27.  
  28. _TEXT   SEGMENT PARA PUBLIC 'CODE'
  29.  
  30. DGROUP  group   _DATA, _TEXT, _BSS
  31.         ASSUME  DS:DGROUP, CS:DGROUP
  32.  
  33. ;       The following table defines all of the available vectors as
  34. ;       residing in the Turbo C module.
  35.  
  36.         EXTRN   _install       : NEAR,   _init           : NEAR
  37.         EXTRN   _clear         : NEAR,   _post           : NEAR
  38.         EXTRN   _move          : NEAR,   _draw           : NEAR
  39.         EXTRN   _vect          : NEAR,   _bar            : NEAR
  40.         EXTRN   _patbar        : NEAR,   _arc            : NEAR
  41.         EXTRN   _pieslice      : NEAR,   _filled_ellipse : NEAR
  42.         EXTRN   _palette       : NEAR,   _allpalette     : NEAR
  43.         EXTRN   _color         : NEAR,   _fillstyle      : NEAR
  44.         EXTRN   _linestyle     : NEAR,   _textstyle      : NEAR
  45.         EXTRN   _text          : NEAR,   _textsiz        : NEAR
  46.         EXTRN   _floodfill     : NEAR,   _getpixel       : NEAR
  47.         EXTRN   _setpixel      : NEAR,   _bitmaputil     : NEAR
  48.         EXTRN   _savebitmap    : NEAR,   _restorebitmap  : NEAR
  49.         EXTRN   _setclip       : NEAR,   _color_query    : NEAR
  50.  
  51.  
  52.         BGI     DEBUG           ; Defining a Debugging Driver
  53.  
  54. DDOVEC  DW      _install        ; Driver initialization and installation
  55.                                 ; Input:    AX=Command #   CX = Parameter
  56.                                 ; Output:   Varies according to command
  57.  
  58.         DW      _init           ; Initialize device for output
  59.                                 ; Input:    ES:BX points to information table
  60.                                 ; Output:   None
  61.  
  62.         DW      _clear          ; Clear graphics device and ready it for new
  63.                                 ; output. (Clear Screen, Load Paper, ... )
  64.                                 ; Input:    None
  65.                                 ; Output:   None
  66.  
  67.         DW      _post           ; Post - Make picture visible. Enable screen,
  68.                                 ; print paper, eject current sheet, ...
  69.                                 ; Input:    None
  70.                                 ; Output:   None
  71.  
  72.         DW      _move           ; Set Current Drawing Pointer to value.
  73.                                 ; Input:    AX = X coord,  BX = Y Coord
  74.                                 ; Output:   None
  75.  
  76.         DW      _draw           ; Draw a line from the Current Pointer to
  77.                                 ; the given coordinate.
  78.                                 ; Input:    AX = X coord,  BX = Y Coord
  79.                                 ; Output:   None
  80.  
  81.         DW      _vect           ; Draw a line between the given coordinate
  82.                                 ; pairs.
  83.                                 ; Input:    AX = X Start,  BX = Y Start
  84.                                 ;           CX = X End,    DX = Y End
  85.                                 ; Output:   None
  86.  
  87.         DW      EMULATE         ; Emulated polygon
  88.  
  89.         DW      _bar            ; Draw a filled rectangle with the CP as the
  90.                                 ; Lower Left corner, and the given coordinate
  91.                                 ; as the upper right.
  92.                                 ; Input:    AX = X Corner  BX = Y Corner
  93.                                 ;           CX = Depth for #D bars
  94.                                 ;           DX = Draw Top Flag (DX<>0 Draw Top)
  95.                                 ; Output:   None
  96.  
  97.         DW      _patbar         ; Draw a patterned rectangle with the given
  98.                                 ; coorinate pair. The pattern is provided by
  99.                                 ; the set fill pattern entry.
  100.                                 ; Input:    AX = X Corner  BX = Y Corner
  101.                                 ;           CX = X Corner  DX = Y Corner
  102.                                 ; Output:   None
  103.  
  104.         DW      _arc            ; Draw an elliptical arc from the given start
  105.                                 ; angle to the given end angle, using the CP
  106.                                 ; as the Center Point, and the given X and Y
  107.                                 ; Radii. Angles are 0-360 degrees.
  108.                                 ; Input:    AX = Start Angle  BX = End Angle
  109.                                 ;           CX = X radius of arc
  110.                                 ;           DX = Y radius of arc
  111.                                 ; Output:   None
  112.  
  113.         DW      _pieslice       ; Draw an elliptical sector from the given start
  114.                                 ; angle to the given end angle, using the CP
  115.                                 ; as the Center Point, and the given X and Y
  116.                                 ; Radii. Angles are 0-360 degrees.
  117.                                 ; Input:    AX = Start Angle  BX = End Angle
  118.                                 ;           CX = X radius of arc
  119.                                 ;           DX = Y radius of arc
  120.                                 ; Output:   None
  121.  
  122.         DW      _filled_ellipse ; Draw an ellipse using the CP as the Center
  123.                                 ; Point, and the given X and Y radii.
  124.                                 ; Input:    AX = X Radius of ellipse
  125.                                 ;           BX = Y Radius of ellipse
  126.                                 ; Output:   None
  127.  
  128.         DW      _palette        ; Set a palette entry to a given color.
  129.                                 ; Input:    AX = Index and Command Code
  130.                                 ;           BX, CX, DX as needed
  131.                                 ; Output:   None
  132.  
  133.         DW      _allpalette     ; Load the palette with a table of colors.
  134.                                 ; Input:    ES:BX = Palette Table to load
  135.                                 ; Output:   None
  136.  
  137.         DW      _color          ; Set the palette indexs for the current
  138.                                 ; drawing color and the current fill color.
  139.                                 ; Input:    AL = Drawing Color
  140.                                 ;           AH = Fill color
  141.                                 ; Output:   None
  142.  
  143.         DW      _fillstyle      ; Set current fill pattern. The fill pattern is
  144.                                 ; set to the pattern specified. If the pattern
  145.                                 ; number is -1 then the pattern is define in
  146.                                 ; a user supplied array.
  147.                                 ; Input:    AL = Pattern # (-1 for user def)
  148.                                 ;           ES:BX = User pattern data if needed
  149.                                 ; Output:   None
  150.  
  151.         DW      _linestyle      ; Set current line style. The line style is
  152.                                 ; set to the style specified. If the style
  153.                                 ; number is -1 then the style is define in
  154.                                 ; a user supplied pattern.
  155.                                 ; Input:    AL = Style # (-1 for user def)
  156.                                 ;           BX = User Line Pattern
  157.                                 ;           CX = Line Width (1 or 3)
  158.                                 ; Output:   None
  159.  
  160.         DW      _textstyle      ; Set the text attributes for font rendering
  161.                                 ; Input:    AL = Font Number
  162.                                 ;           AH = Font Path and Direction
  163.